Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@jjaffeux
Copy link
Contributor

The current menu was rendering inside the post text toolbar (on desktop). This is not ideal as the post text toolbar rendering is conditioned on the presence of text selection, when you click a button on the toolbar, by design of the web browsers you will lose your text selection, making all of this super tricky.

This commit makes desktop and mobile behave in the same way by rendering their own menu and capturing the quote state when we render the post text selection toolbar, this allows us to reason a much simpler way about the AI helper.

This commit also removes what appears to be an unused file and corrects which was seemingly copy/paste mistakes.

jjaffeux added 2 commits June 15, 2025 18:26
The current menu was rendering inside the post text toolbar (on desktop). This is not ideal as the post text toolbar rendering is conditioned on the presence of text selection, when you click a button on the toolbar, by design of the web browsers you will lose your text selection, making all of this super tricky.

This commit makes desktop and mobile behave in the same way by rendering their own menu and capturing the quote state when we render the post text selection toolbar, this allows us to reason a much simpler way about the AI helper.

This commit also removes what appears to be an unused file and corrects which was seemingly copy/paste mistakes.
@jjaffeux jjaffeux requested a review from keegangeorge June 15, 2025 16:30
Copy link
Member

@keegangeorge keegangeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the adjustments look good, but we need to fix those two references to this.args.data.selectedText.

Also, previously the menu inherited a behavior from post-text-selection-menu that's gone now. Before, when you have the menu open and scroll, the menu stays in position near the text you selected, but now the menu scrolls as with you as you move. Can we add back that behavior?

@jjaffeux jjaffeux merged commit 6a33e51 into main Jun 19, 2025
11 of 12 checks passed
@jjaffeux jjaffeux deleted the ai-menu-standalone branch June 19, 2025 09:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants